<?php

namespace common\web;

/**
 * The web Request class represents an HTTP request.
 *
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class Request extends \yii\web\Request {

    /**
     * Returns whether this is a PJAX request.
     * @return bool whether this is a PJAX request
     */
    public function getIsModal() {
        return $this->getIsAjax() && $this->headers->has('X-Modal');
    }

}
